package org.pf.base.pfBlocks
{
	import flash.events.EventDispatcher;
	
	/**
	 * ...
	 * @author zeksa'
	 */
	public class PFSemaphore extends EventDispatcher
	{
		protected var _name:String;
		
		public function get name():String
		{
			return _name;
		}
		
		protected var _owner:Object;
		
		public function get owner():Object
		{
			return _owner;
		}
		
		public function PFSemaphore(owner:Object = null, name:String = null)
		{
			_owner = owner;
			_name = name;
			initialize();
		}
		
		protected function initialize():void
		{
			throw new Error("Abstract Method");
		}
		
		public function get locks():int
		{
			throw new Error("Abstract Method");
			return 0;
		}
		
		public function get isLocked():Boolean
		{
			throw new Error("Abstract Method");
			return false;
		}
		
		override public function toString():String
		{
			return "[Semaphore " + name + "]";
		}
	
	}

}